package com.company;

import com.array.Array;
import com.queue.ArrayQueue;
import com.queue.LoopQueue;
import com.queue.Queue;

public class Main {

    public static double cp(Queue queue){
        int num = 10000_0000;
        long startTime = System.nanoTime();
        for(int i = 0; i < num; i++)
            queue.enQueue(10);
        for (int i = 0; i < queue.getSize(); i++)
            queue.deQueue();
        long endTime = System.nanoTime();

        return (endTime - startTime) / 1000000000.0;

    }

    public static void main(String[] args) {
//        Queue<Integer> queue = new ArrayQueue<>();
        Queue<Integer> queue2 = new LoopQueue<>();

//        System.out.println(cp(queue));
        System.out.println(cp(queue2));


    }
}
